using System;
using System.Collections;
using Neo.Generator.Core;
using Neo.MetaModel;

namespace Webbness.Module.VsTool
{
    [Serializable]
    public class SolutionAndProjectContext : GenerationContext
    {
        private string _baseDir;
        private string _compGuid;
        private string _contGuid;
        private string _extension;
        private string _modelGuid;
        private IList _projectFiles;
        private string _projName;
        private string _projType;
        private IList _resourceFiles;
        private string _unitTestGuid;
        private bool _useBuiltins;
        private string _viewGuid;
        private string _xmlFileName;

        public SolutionAndProjectContext(Model model)
            : base(model)
        {
            _contGuid = Guid.NewGuid().ToString().ToUpper();
            _compGuid = Guid.NewGuid().ToString().ToUpper();
            _modelGuid = Guid.NewGuid().ToString().ToUpper();
            _viewGuid = Guid.NewGuid().ToString().ToUpper();
            _unitTestGuid = Guid.NewGuid().ToString().ToUpper();
        }

        public string BaseDirectory
        {
            get { return _baseDir; }
            set { _baseDir = value; }
        }

        public string ComponentGuid
        {
            get { return _compGuid; }
        }

        public string ControllerGuid
        {
            get { return _contGuid; }
        }

        public string Extension
        {
            get { return _extension; }
            set { _extension = value; }
        }

        public string ModelGuid
        {
            get { return _modelGuid; }
        }

        public IList ProjectFiles
        {
            get { return _projectFiles; }
            set { _projectFiles = value; }
        }

        public string ProjectName
        {
            get { return _projName; }
            set { _projName = value; }
        }

        public string ProjectType
        {
            get { return _projType; }
            set { _projType = value; }
        }

        public IList ResourceFiles
        {
            get { return _resourceFiles; }
            set { _resourceFiles = value; }
        }

        public string UnitTestGuid
        {
            get { return _unitTestGuid; }
        }

        public string ViewGuid
        {
            get { return _viewGuid; }
        }

        public string XmlFileName
        {
            get { return _xmlFileName; }
            set { _xmlFileName = value; }
        }

        public bool UseBuiltins
        {
            get { return _useBuiltins; }
            set { _useBuiltins = value; }
        }

        public override string ToString()
        {
            return "SolutionAndProjectContext";
        }
    }
}